package service;

import dao.database;
import pojo.User;

import java.sql.ResultSet;

public class UserService {

    public static boolean login(User u) throws Exception {
        database d = new database();
        String sql = "select * from user where id=" + u.getId() +
                " and passwd=" + u.getPasswd();
        ResultSet resultSet = d.executeQuery(sql);

        return resultSet.next();

    }
}
